﻿/* Nibiru Studio Engine Version [1070] */
// Copyright (c) 2020-2023 Nibiru. All rights reserved.
#pragma once
#include "Apis/NComponent.h"
#include "Apis/Nphysics.h"


#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>


ENGINE_NAMESPACE_BEGIN

#define EYE_API DLLEXPORT

OBJECT_CLASS(EYE)
class EYE_API EYE : public NComponent
{
	DECLARE_CLASS(EYE, NComponent)
	DECLARE_RTTI
	ENABLE_REFLECTION
public:
	EYE() = default;
	virtual ~EYE() = default;

	virtual void Start() override;
	virtual void Update() override;
	virtual void OnDestroy() override;
	virtual void PostEditChangeProperty(std::string& propertyName) override;

	virtual void Serialize(Archive& ar) override;
	virtual void LateDeserialize(Archive& ar) override;
private:
    Vector3 startPoint;
    Vector3 endPoint;
    Vector3 dirPoint;


    Vector3 mainCameraPos;


private:

	void readCsv(const std::string& filePath);
	std::string line; //存储文件读取一行
	std::ifstream file; //读取的文件

	NActorPtr m_sphere_start = nullptr; //模拟眼动的起点
	NActorPtr m_sphere_end = nullptr; //模拟眼动的终点

	std::string filePath = "/data/output.csv"; // 替换为你的CSV文件路径dr



};
DECLARE_PTR(EYE)
ENGINE_NAMESPACE_END
